package com.whfc.fim.dao;

import com.whfc.fim.dto.FimMsgToUserDTO;
import com.whfc.fim.entity.FimWarnRuleUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author : qzexing
* @version : 1.0
* @date : 2020-09-08 18:38
*/

public interface FimWarnRuleUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FimWarnRuleUser record);

    int insertSelective(FimWarnRuleUser record);

    FimWarnRuleUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FimWarnRuleUser record);

    int updateByPrimaryKey(FimWarnRuleUser record);

    /**
     * 查询报警联系人
     *
     * @param id
     * @return
     */
    List<FimMsgToUserDTO> selectByWarnRuleId(@Param("warnRuleId") Integer id);

    /**
     * 通过ruleId删除
     *
     * @param warnRuleId
     */
    int deleteByWarnRuleId(@Param("warnRuleId") Integer warnRuleId);

    /**
     * 批量插入
     *
     * @param list
     * @return
     */
    int batchInsert(@Param("list") List<FimWarnRuleUser> list);
}